package source.view.viewobjects;

import java.awt.Graphics2D;

import source.model.ObjectID;
import source.model.type.ItemType;
import source.view.ImageLibrary;

public class ViewItem extends ViewObject {
	private ItemType iType;
	
	public ViewItem(ItemType iType, ObjectID oid){
		this.iType = iType;
		this.setObjectID(oid);
	}

	public void paint(Graphics2D g) {
		g.translate(10, 0);
		g.setColor(java.awt.Color.RED);
		g.drawImage(ImageLibrary.getItemImage(iType),null, 10,-15);
		g.drawString(iType.name(), 0,0);
	}
}
